home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / desaxe / saxXML.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-09-30  |  737 b   |  42 lines

  1. /*
  2.  *  saxXML.h
  3.  *  
  4.  *
  5.  *  Created by Andreas Vox on 21.09.06.
  6.  *  Copyright 2006 under GPL2. All rights reserved.
  7.  *
  8.  */
  9.  
  10.  
  11.  
  12. #ifndef SAXXML_H
  13. #define SAXXML_H
  14.  
  15. #include <fstream>
  16. #include "saxhandler.h"
  17. #include "scribusapi.h"
  18.  
  19. class SCRIBUS_API SaxXML : public SaxHandler {
  20. public:
  21.     SaxXML(std::ostream& file, bool pretty=false);
  22.     SaxXML(const char* filename, bool pretty=false);
  23.     ~SaxXML();
  24.     
  25.     void beginDoc();
  26.     void endDoc();
  27.     void begin(const Xml_string& tag, Xml_attr attr);
  28.     void end(const Xml_string& tag);
  29.     void chars(const Xml_string& text);
  30.  
  31. private:
  32.     std::ofstream m_file;
  33.     std::ostream& m_stream;
  34.     bool m_pretty;
  35.     int m_indentLevel;
  36.     bool m_manyAttributes;
  37.     bool pendingEmptyTag;
  38.     void finalizePendingEmptyTag();
  39. };
  40.  
  41. #endif
  42.